<!DOCTYPE html>
<html lang="zh_CN">
<head>
    <meta charset="UTF-8">
    <title>WebSocket测试 - 在线工具 - OKTools</title>
    <meta name="keywords" content="WebSocket,WebSocket测试,WebSocket工具">
    <meta name="description" content="在线WebSocket测试工具,WebSocket测试,WebSocket工具">
    <link rel="shortcut icon" href="/favicon.ico">
    <link rel="stylesheet" href="./static/css/style.css" type="text/css">
    <style>
        #msg_list {
            padding: 8px 16px;
            height: 70vh;
            font-size: 14px;
            overflow: auto;
        }
    </style>
</head>
<body>
{{template "aside"}}
<main>
    <div class="container">
        <h1>WebSocket测试</h1>
        <div class="flex mt-2">
            <label class="group fullwidth">
                <span class="static">地址</span>
                <input id="input_server" class="input">
            </label>
            <div class="group" style="margin-left: 1em;flex-shrink: 5">
                <button class="button" onclick="connect(this)">连接</button>
                <button class="button" onclick="disconnect(this)">断开</button>
                <button class="button" onclick="cleanup(this)">清空</button>
            </div>
        </div>
        <div id="msg_list" class="tile bordered mt-2"></div>
        <div class="group fullwidth mt-2">
            <span class="static">消息</span>
            <input id="input_msg" class="input">
            <button class="button primary" onclick="send()">发送</button>
        </div>
    </div>
</main>
<script src="./static/js/websocket.js"></script>
</body>
</html>